import pytest
import allure
import time
import os

if __name__ == '__main__':
    report_dir = r'..\reports'
    now = time.strftime('%Y-%m-%d_%H_%M_%S')
    report_name = rf'{report_dir}\{now}_html'

    args = [r'..\test_case', '-vs', rf'--alluredir={report_dir}', '--clean-alluredir']
    cmd = rf'allure generate {report_dir} -o {report_name}'

    pytest.main(args)
    os.system(cmd)
